package dreampack.dataType;

import java.sql.*;
import dreampack.*;
import dreampack.dataQuery.*;

public class TeacherData{
	
	private SubjectType subject;
	private String mobileTel;
	private String homeTel;
	private String officeTel;
	
	public TeacherData(){}
	
	public boolean init(DreamDB dreamDb, ResultSet rs) throws Exception{
		boolean bRet = true;

		this.subject = SubjectQuery.queryById(dreamDb, rs.getInt("subject"));
		this.mobileTel = (String)rs.getString("mobile_tel");
		this.homeTel = (String)rs.getString("home_tel");
		this.officeTel = (String)rs.getString("office_tel");

		return bRet;
	}
	public SubjectType getSubject(){
		return this.subject;
	}
	public String getMobileTel(){
		return this.mobileTel;
	}
	public String getHomeTel(){
		return this.homeTel;
	}
	public String getOfficeTel(){
		return this.officeTel;
	}
}
